<template>
  <div id="body">
    <el-container>
      <ElHeader></ElHeader>
    

      <el-container style="height: 67vh; width: 1200px; margin: 50px auto">
        <el-aside class="aside" style="width: 140px;">
          <el-menu router :default-active="$route.path" :collapse="isCollapse">
            <el-menu-item index="/home/index">
              <span slot="title" style="margin-left: 10px;">首页</span>
            </el-menu-item>
            <el-menu-item index="/home/xitong">
              <span slot="title">系统消息</span>
            </el-menu-item>
            <el-menu-item index="/home/order">
              <span slot="title">订单中心</span>
            </el-menu-item>
            <el-submenu index="1" class="item">
              <template slot="title">
                <span>个人中心</span>
              </template>
              <el-menu-item index="/home/xinxi">我的信息</el-menu-item>
              <el-menu-item index="/home/store">我的收藏</el-menu-item>
              <el-menu-item index="/home/comment">我的点评</el-menu-item>

              <el-menu-item index="/home/pwd">修改密码</el-menu-item>
            </el-submenu>
            <!-- <el-submenu index="2" class="item">
              <template slot="title">
                <span>常用信息管理</span>
              </template>
              <el-menu-item index="/home/passenger">常用旅客信息</el-menu-item>
              <el-menu-item index="/home/address">常用地址管理</el-menu-item>
            </el-submenu> -->
            <el-menu-item index="/home/help">
              <span slot="title">帮助中心</span>
            </el-menu-item>
          </el-menu>
        </el-aside>
        <el-container>
          <el-main>
            <!-- 二级路由 动态设置内容 -->
            <router-view />
          </el-main>
        </el-container>
      </el-container>
      <el-footer>
        <div class="footer">
          <div class="footerhead">
            <el-link href="" :underline="false" class="bold">关于我们</el-link>
            <el-link href="" :underline="false" class="bold">旅社预定</el-link>
            <el-link href="" :underline="false" class="bold">附近景点</el-link>
            <el-link href="" :underline="false" class="bold">最新资讯</el-link>
          </div>
          <el-divider></el-divider>
          <div class="footerbody">
            <div class="yi">
              <span>E-Mail：service@yhachina.com</span>
              <span>广州市天河区体育西路103号维多利广场A塔3606室</span>
            </div>
            <div class="er">
              <el-button
                type="info"
                circle
                size="mini"
                icon="el-icon-edit"
              ></el-button>
              <el-button
                type="info"
                circle
                size="mini"
                icon="el-icon-edit"
              ></el-button>
            </div>
            <div class="san">
              <el-link :underline="false" class="wo">国际联盟官方网站</el-link>
              | <el-link :underline="false" class="wo">友情链接</el-link> |
              <el-link :underline="false" class="wo">帮助中心</el-link>
            </div>
            <div class="si">
              <span>版权所有 © 中国国际青年旅舍®总部</span>
              <el-link :underline="false" class="ni">粤ICP备05005462号</el-link>
              <el-link :underline="false" class="ni"
                >粤公网安备 44010602004069号</el-link
              >
            </div>
          </div>
        </div>
      </el-footer>
    </el-container>
  </div>
</template>

<script>
import ElFooter from '@/components/ElFooter.vue'
import ElHeader from '@/components/ElHeader.vue'
export default {
  components: {ElFooter, ElHeader },
  data() {
    return {
      isCollapse: false,
      loginID: '',
    }
  },
  mounted () {
   // 获取用户名
   let loginID = JSON.parse(sessionStorage.getItem('user'))
    console.log('user', loginID)
    if (loginID.uname == '') {
      loginID = '登录'
    }
    this.loginID = loginID.uname
  },
}
</script>

<style lang="scss" scoped>

#body {
  background-color: rgb(245, 245, 245);
}
* {
  // background-color: #fff;
  margin: 0;
  padding: 0;
  border: 0;

  font-size: 100%;
  // vertical-align: baseline;
  // box-sizing: border-box;
}
.headerspan {
  position: relative;
  // margin-right: 10px;
  right: 0;
  width: 600px;

  div:nth-child(1) {
    position: absolute;
    top: 5px;
    height: 35px;
    right: 0;
    width: 250px;
    display: flex;
    justify-content: space-between;
    line-height: 35px;

    .little {
      font-weight: 300;
      font-size: 12px;
    }
  }

  div:nth-child(2) {
    position: absolute;
    width: 600px;
    right: 0;
    top: 35px;
    display: flex;
    justify-content: space-between;
    line-height: 35px;

    .bold {
      font-weight: bold;
      color: black;
    }
  }
}
.header {
  width: 1300px;
  margin: 0 auto;
}




.el-header,
.el-footer {
  color: #333;
  text-align: center;
}

.el-aside {
  color: #333;
  span{
    margin-left: 10px;
  }
  // text-align: center;
}
// .el-menu {
//   background-color: rgb(245, 245, 245);
// }
// .el-menu-item {
//   background-color: rgb(245, 245, 245);
// }
.el-aside::-webkit-scrollbar {
  display: none;
}
.el-footer {
  padding: 0;
}
.footer {
  background: #282a2b;

  height: 300px;
  width: 100%;
  // margin-top: 50px;

  .footerhead {
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-evenly;
    height: 50px;
    line-height: 50px;

    .bold {
      color: white;
    }
  }

  .footerbody {
    width: 900px;
    margin: 0 auto;
    position: relative;

    .yi {
      position: absolute;
      right: 0;
      color: #696a6b;
      font-size: 12px;
      display: flex;
      flex-direction: column;
      text-align: right;
      height: 40px;
    }

    .er {
      position: absolute;
      right: 0;
      top: 45px;
    }

    .san {
      position: absolute;
      right: 0;
      top: 90px;
      color: #696a6b;
      font-size: 12px;
      width: 250px;
      display: flex;
      justify-content: space-between;

      .wo {
        font-size: 12px;

        &:hover {
          color: #999999;
        }
      }
    }

    .si {
      position: absolute;
      right: 0;
      top: 130px;
      height: 20px;
      line-height: 20px;
      display: flex;
      width: 500px;
      justify-content: space-between;

      span {
        font-size: 12px;
        color: #696a6b;
      }

      .ni {
        font-size: 12px;

        &:hover {
          color: #999999;
        }
      }
    }
  }
}
</style>
